<?
session_start();
require "../../../global.php";//$dirname."/".
require RootDir."/"."inc/config.php";
require RootDir."/"."inc/Uifunction.php";
require RootDir."/".$SystemConest[1]."/UIFunction/adminClass.php";
require RootDir."/".$SystemConest[1]."/system/Config.php";
require RootDir."/".$SystemConest[1]."/system/menusys/function.php";
require RootDir."/".$SystemConest[1]."/system/classsys/function.php";
require "function.php";
require "AdminSysClass.php";

$mydb=new YYBDB();
$TableName=reTableName($mydb,$MenuId);
CheckRule($MenuId,$mydb,$TableName,"");//检查登陆权限

   
	$UserID=$_REQUEST["UserID"];
	
	if(strlen($_REQUEST["Submit"])>0)
	{
		//权限控制
		$MenuId=(int)($_REQUEST["MenuId"]);
		CheckRule($MenuId,$mydb,$TableName,"Update");//检查更新权限
		//保存
		AllRuleSave($mydb,$UserID,"Add");
	}
	
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>权限管理</title>
<link href="../../Inc/Css.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<? ShowMenuTile($mydb,$UserID) ?>

<label>
<div align="center"><br>
  <input type="submit" name="Submit" value=" 保存 ">
  <input type="button" name="Submit2" value=" 取消 " onClick="window.history.back();"/>  
</div>

</label>

</form>
<div align="center"><span id="checkall" style="cursor:pointer;">全选</span> ,<span id="checkallno" style="cursor:pointer;">全不选</span></div>
<script language="javascript">
$(document).ready(function(){
	$("#checkall").bind("click",function(){
		$(":checkbox").attr("checked",true);
	});
	$("#checkallno").bind("click",function(){
		$(":checkbox").removeAttr("checked");
	});
});

</script>


</body>
</html>


